.class Lcom/burstly/lib/component/networkcomponent/burstly/html/OrmmaBurstlyScriptAdaptor;
.super Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;
.source "OrmmaBurstlyScriptAdaptor.java"


# direct methods
.method constructor <init>(Landroid/content/Context;Ljava/lang/String;)V
    .locals 0
    .parameter "context"
    .parameter "viewId"

    .prologue
    .line 42
    invoke-direct {p0, p1, p2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    .line 43
    return-void
.end method


# virtual methods
.method protected checkParameters(Ljava/util/Map;)V
    .locals 2
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "*>;)V"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalArgumentException;
        }
    .end annotation

    .prologue
    .line 47
    .local p1, paramsFromServer:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;*>;"
    invoke-super {p0, p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->checkParameters(Ljava/util/Map;)V

    .line 48
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/OrmmaBurstlyScriptAdaptor;->mUrlProvider:Lcom/burstly/lib/component/networkcomponent/burstly/html/UrlProvider;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/UrlProvider;->setUrl(Ljava/lang/String;)V

    .line 49
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/OrmmaBurstlyScriptAdaptor;->mScriptContent:Ljava/lang/String;

    const-string v1, "Rich media script content is null"

    invoke-static {v0, v1}, Lcom/burstly/lib/util/Utils;->checkNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    .line 50
    return-void
.end method

.method protected createMediaListener(Lcom/burstly/lib/component/networkcomponent/burstly/html/StatisticsSender;)Lcom/burstly/lib/component/networkcomponent/burstly/html/IRichMediaAdListener;
    .locals 5
    .parameter "statisticsSender"

    .prologue
    .line 81
    new-instance v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/RedirectClickListener;

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/OrmmaBurstlyScriptAdaptor;->getAdaptorListener()Lcom/burstly/lib/component/IBurstlyAdaptorListener;

    move-result-object v1

    check-cast v1, Lcom/burstly/lib/component/AbstractAdaptor$AdaptorListenerWrapper;

    const-string v2, "burstlyScript"

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/OrmmaBurstlyScriptAdaptor;->isFullscreen()Z

    move-result v3

    iget-object v4, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/OrmmaBurstlyScriptAdaptor;->mUrlProvider:Lcom/burstly/lib/component/networkcomponent/burstly/html/UrlProvider;

    invoke-direct {v0, v1, v2, v3, v4}, Lcom/burstly/lib/component/networkcomponent/burstly/html/RedirectClickListener;-><init>(Lcom/burstly/lib/component/AbstractAdaptor$AdaptorListenerWrapper;Ljava/lang/String;ZLcom/burstly/lib/component/networkcomponent/burstly/html/UrlProvider;)V

    .line 83
    .local v0, handler:Lcom/burstly/lib/component/networkcomponent/burstly/html/RedirectClickListener;
    new-instance v1, Lcom/burstly/lib/component/networkcomponent/burstly/html/SimpleRichMediaListener;

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/OrmmaBurstlyScriptAdaptor;->getAdaptorListener()Lcom/burstly/lib/component/IBurstlyAdaptorListener;

    move-result-object v2

    const-string v3, "burstlyScript"

    invoke-direct {v1, v2, v3, p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/SimpleRichMediaListener;-><init>(Lcom/burstly/lib/component/IBurstlyAdaptorListener;Ljava/lang/String;Lcom/burstly/lib/component/networkcomponent/burstly/html/StatisticsSender;)V

    invoke-virtual {v0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/RedirectClickListener;->setRichMediaListener(Lcom/burstly/lib/component/networkcomponent/burstly/html/IRichMediaAdListener;)V

    .line 84
    return-object v0
.end method

.method protected createStatisticsSender()Lcom/burstly/lib/component/networkcomponent/burstly/html/StatisticsSender;
    .locals 3

    .prologue
    .line 67
    new-instance v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/StatisticsSender$StatisticsSenderBuilder;

    invoke-direct {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/StatisticsSender$StatisticsSenderBuilder;-><init>()V

    .line 68
    .local v0, builder:Lcom/burstly/lib/component/networkcomponent/burstly/html/StatisticsSender$StatisticsSenderBuilder;
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/OrmmaBurstlyScriptAdaptor;->getViewId()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/StatisticsSender$StatisticsSenderBuilder;->setBurstlyViewId(Ljava/lang/String;)Lcom/burstly/lib/component/networkcomponent/burstly/html/StatisticsSender$StatisticsSenderBuilder;

    move-result-object v1

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/OrmmaBurstlyScriptAdaptor;->getResponseData()Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;

    move-result-object v2

    invoke-virtual {v2}, Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;->getCrid()Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Integer;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/StatisticsSender$StatisticsSenderBuilder;->setCreativeId(Ljava/lang/String;)Lcom/burstly/lib/component/networkcomponent/burstly/html/StatisticsSender$StatisticsSenderBuilder;

    move-result-object v1

    const-string v2, "ormma"

    invoke-virtual {v1, v2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/StatisticsSender$StatisticsSenderBuilder;->setEventType(Ljava/lang/String;)Lcom/burstly/lib/component/networkcomponent/burstly/html/StatisticsSender$StatisticsSenderBuilder;

    move-result-object v1

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/OrmmaBurstlyScriptAdaptor;->getRequestData()Lcom/burstly/lib/network/beans/RequestData;

    move-result-object v2

    invoke-virtual {v2}, Lcom/burstly/lib/network/beans/RequestData;->getZone()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/StatisticsSender$StatisticsSenderBuilder;->setZoneId(Ljava/lang/String;)Lcom/burstly/lib/component/networkcomponent/burstly/html/StatisticsSender$StatisticsSenderBuilder;

    .line 70
    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/StatisticsSender$StatisticsSenderBuilder;->build()Lcom/burstly/lib/component/networkcomponent/burstly/html/StatisticsSender;

    move-result-object v1

    return-object v1
.end method

.method public ormmaViewCreated(Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;)V
    .locals 2
    .parameter "view"

    .prologue
    .line 54
    invoke-super {p0, p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->ormmaViewCreated(Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;)V

    .line 55
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/OrmmaBurstlyScriptAdaptor;->createStatisticsSender()Lcom/burstly/lib/component/networkcomponent/burstly/html/StatisticsSender;

    move-result-object v1

    invoke-virtual {p0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/OrmmaBurstlyScriptAdaptor;->createMediaListener(Lcom/burstly/lib/component/networkcomponent/burstly/html/StatisticsSender;)Lcom/burstly/lib/component/networkcomponent/burstly/html/IRichMediaAdListener;

    move-result-object v0

    .line 56
    .local v0, createMediaListener:Lcom/burstly/lib/component/networkcomponent/burstly/html/IRichMediaAdListener;
    invoke-virtual {p1, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;->setListener(Lcom/burstly/lib/component/networkcomponent/burstly/html/IRichMediaAdListener;)V

    .line 57
    check-cast v0, Landroid/webkit/WebViewClient;

    .end local v0           #createMediaListener:Lcom/burstly/lib/component/networkcomponent/burstly/html/IRichMediaAdListener;
    invoke-virtual {p1, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;->setWebViewClient(Landroid/webkit/WebViewClient;)V

    .line 58
    const/16 v1, 0x82

    invoke-virtual {p1, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;->requestFocus(I)Z

    .line 59
    return-void
.end method
